package com.pizzaria.bean;

import com.pizzaria.bean.Cliente;
import br.com.dk.database.DBActionsBase;
import org.hibernate.criterion.Restrictions;
import java.util.List;

public class ClienteDAO extends DBActionsBase{
	public static Cliente get(long id) {
		return findSingle(Cliente.class,  Restrictions.eq("id",id));
	}
	public static Cliente getByCpf(String o) {
		return findSingle(Cliente.class, Restrictions.eq("cpf", o));
	}
	public static List<Cliente> getAll() {
		return findAll(Cliente.class);
	}
}